/**
 * 
 */
package com.gcb.domain;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;

/**
 * 
 * @author Cre.Gu
 * 
 */
@Entity
public class Channel implements Serializable {
	private static final long serialVersionUID = -7406881755186865601L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	protected Long id;

	@OneToOne(cascade = { CascadeType.REMOVE })
	@PrimaryKeyJoinColumn
	private ChannelExt channelExt;

	public Channel() {

	}
	
	public static Channel create() {
		Channel channel=new Channel();
		return channel;
	}

	public Channel(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public ChannelExt getChannelExt() {
		return channelExt;
	}

	public void setChannelExt(ChannelExt channelExt) {
		this.channelExt = channelExt;
	}
}
